﻿// Copyright (c) egmkang wang. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace XServer.GrainInterfaces
{
    using System.Threading.Tasks;
    using Orleans;
    using Orleans.Concurrency;

    /// <summary>
    /// Grain把消息发送给Gateway的方式
    /// </summary>
    public interface IGatewayObserver : IGrainObserver
    {
        /// <summary>
        /// 观察者收到的消息
        /// </summary>
        /// <param name="destType">目标类型</param>
        /// <param name="dest">目标ID</param>
        /// <param name="buffer">序列化好的消息</param>
        void OnRecvMessage(int destType, long dest, Immutable<byte[]> buffer);
    }
}
